#pragma once
#include "afxcmn.h"
#include "afxwin.h"


// CDlgPixel dialog

class CDlgPixel : public CDialogEx
{
	DECLARE_DYNAMIC(CDlgPixel)

public:
	CDlgPixel(CWnd* pParent = NULL);   // standard constructor
	virtual ~CDlgPixel();

public:
	CPixLedCtrl m_PixLedCtrl;

	CIconButton m_btnArrow;
	CIconButton m_btnPencil;
	CIconButton m_btnEraser;
	CIconButton m_btnSelect;
	CIconButton m_btnInvert;

	CColorButton m_btnColor;
	CColorButton m_btnBkgndColor;

	CIconButton m_btnSave;
	CIconButton m_btnOpen;

	//CString m_strImg_Path;

	CList<CString, CString&> m_strFileList;

	CImageList* m_pImageList;
	CString m_strImageName;

public:
	void initToolBox();
	void initPixLedCtrl();

	void setIconButtonState(BOOL bState);

	void initListCtrl();
	BOOL LoadImageToList(CString);
	BOOL LoadBitmapToList(CString, int);

	BOOL CreateGifFromBmp(CList<CString, CString&>& strFileList, int nDelay, char* pszGifFileName);

// Dialog Data
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_DLG_PIXEL };
#endif

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()
public:
	virtual BOOL OnInitDialog();
	afx_msg void OnBnClickedButtonDrawNull();
	afx_msg void OnBnClickedButtonDrawPencil();
	afx_msg void OnBnClickedButtonDrawEraser();
	afx_msg void OnBnClickedButtonDrawSelector();
	afx_msg void OnBnClickedButtonDrawInvert();
	CListCtrl m_List_Thumbnail_Img;
	afx_msg LRESULT OnBnClickedColorSelChange(WPARAM wParam, LPARAM lParam);
	afx_msg void OnBnClickedButtonDeleteImg();
	afx_msg void OnBnClickedButtonCreateGif();
	afx_msg void OnBnClickedButtonDrawSave();
	afx_msg void OnBnClickedButtonDrawOpen();
	afx_msg void OnBnClickedButtonOpenDir();
	afx_msg void OnItemchangedListThumbnailImg(NMHDR *pNMHDR, LRESULT *pResult);
	CString m_strImg_Path;
	afx_msg void OnBnClickedButtonAnimateLeft();
	afx_msg void OnBnClickedButtonAnimateRight();
	afx_msg void OnBnClickedButtonSetSize();
	CComboBox m_cmbLed_Width;
	CComboBox m_cmbLed_Height;
};
